package org.chapter.Util;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by Mr.no.
 * User:yangyun
 * Date:2017/9/25
 * Time:18:53
 */

/**
 * 字符串工具类
 */
public final class StringUtil {
    /**
     * 判断字符串是否为空
     */
    public static boolean isEmpty(String str) {
        if (str != null) {
            str = str.trim();
        }
        return StringUtils.isEmpty(str);
    }

    /**
     * 判断字符串是否非空
     */
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }
}
